package siga.criptografia;

import java.math.BigInteger;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;

public class md5 {
    public static String crpMD5(String dados){
        MessageDigest md = null;
        try{
            md = MessageDigest.getInstance("MD5");
        } catch(NoSuchAlgorithmException e){
            e.printStackTrace();
        }
        BigInteger hash = new BigInteger(1, md.digest(dados.getBytes()));
        return hash.toString(16);    
    }
}
